FROM ubuntu:22.04 
ENV DEBIAN_FRONTEND=noninteractive 

RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse" > /etc/apt/sources.list && \
echo "deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse" >> /etc/apt/sources.list && \
apt-get update -y  && \
apt-get install -y tzdata  && \
echo "Asia/Shanghai" > /etc/timezone  && \
dpkg-reconfigure -f noninteractive tzdata  && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  && \
apt-get install -y git && \
git clone -b ssh-service https://gitcode.com/hq_linux/system_init.git /tmp/ssh-service && \
cd /tmp/ssh-service && chmod +x *.sh && ./init.sh && \
cp ./start.sh /start.sh && chmod +x /start.sh && \
git clone -b ubuntu-22-04 https://gitcode.com/hq_linux/system_init.git /tmp/ubuntu-22-04 && \
cd /tmp/ubuntu-22-04 && cat ./list/aliyun_sources.list > /etc/apt/sources.list && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/lib/apt/archives/* /tmp/* 
EXPOSE 80 443 
ENTRYPOINT ["/bin/bash", "-c"] 
CMD ["/start.sh"] 
